<template>
  <div>
    图像识别接口
    <div style="display:flex;justify-content:center">
      <el-upload
        action="http://120.77.41.127:8888/recognition/plant"
        list-type="picture-card"
        :on-success="successHandler"
      >
        <i class="el-icon-plus"></i>
      </el-upload>
    </div>

    <div>
      <h2>识别结果：</h2>
      <el-table :data="resp.result">
        <el-table-column label="精确度" align="center" prop="score">
        </el-table-column>
        <el-table-column label="分类" align="center" prop="root">
        </el-table-column>
        <el-table-column label="关键字" align="center" prop="keyword">
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      resp: {}
    };
  },
  methods: {
    successHandler(resp) {
      this.resp = resp;
    }
  }
};
</script>
<style lang="sass" scoped>

</style>